<template>
    <div>
        <div class="swiper-container fn2" >
            <div class="swiper-wrapper ">
            <div class="swiper-slide"><img src="../assets/images/banner3.png" alt=""></div>
            <div class="swiper-slide"><img src="../assets/images/banner3.png" alt=""></div>
            <div class="swiper-slide"><img src="../assets/images/banner3.png" alt=""></div>
            
            </div>
            <!-- Add Pagination -->
            <div class="swiper-pagination"></div>
        </div>
        <section class="proSec">
            <div class="title">
                <h2>产品(源码出售)</h2>
                <a href="">更多>></a>
            </div>
            <div class="produce clearfix">
                   <ul>
                        <li v-for="(ele,index) of obj" :key="index">
                        <a href=""><img :src="ele.img"></a>
                        <h4>{{ele.title}}</h4>
                        <p>{{ele.content}}</p>
                        </li>
                   </ul>
            </div>
        </section >
    </div>
</template>
<script>
export default {
    data(){
        return {
            obj:null
        }
    },
    mounted(){
         var swiper = new Swiper(".swiper-container", {
      slidesPerView: 1,
      loop: true,
      autoplay: {
        delay: 2500,
        disableOnInteraction: false,
      },
      pagination: {
        el: ".swiper-pagination",
        clickable: true
      }
     
    });  
    fetch("./server/data/proData.json").then(res=>res.json()).then(res=>{
       // console.log(res)
        this.obj=res
        console.log(this.obj)
        })
    }
}
</script>
<style>
.fn2{height:2.7rem;width: 100%}
.fn2 img{width:100%}
.clearfix::after {
  content: "";
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
}
.title {
  padding: 0.2rem;
  background: #efefef;
  height: 0.5rem;
  line-height: 0.5rem;
}
h2 {
  font-size: 0.32rem;
  color: #555;
  font-weight: normal;
  float: left;
}
.title a {
  float: right;
  color: #555;
  font-size: 0.3rem;
}
.produce {
  padding: 0 0.2rem;
  height: auto;
  padding-bottom: 0.4rem
}
.produce ul{margin-left: 0.2rem}
.produce ul li {
  float: left;
  width: 47%;
  height: 2rem;
  text-align: center;
  margin-top: 0.3rem;
  margin-right: 0.2rem;
  padding: 1rem 0;
  background: #fff;
  animation: moveleft 1s 0s ease both; 
}
.produce ul li img {
  height: 0.8rem;
}
.produce ul li h4 {
  font-size: 0.3rem;
  font-weight: normal;
  line-height: 0.8rem;
}
.produce ul li p {
  font-size: 0.2rem;
  color: #ccc;
  padding: 0 0.2rem;
}
</style>

